/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-03 14:14:47  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.bp.entity;

import static javax.persistence.GenerationType.IDENTITY;
import java.util.Set;
import java.util.LinkedHashSet;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.EntityListeners;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "WWYT_BP_MANUFACTURING_TECH")
@SQLDelete(sql="update WWYT_BP_MANUFACTURING_TECH set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql="update WWYT_BP_MANUFACTURING_TECH set DELETE_FLAG = '1' where id= ?")
@Where(clause="DELETE_FLAG = '0'")

public class BpManufacturingTech implements java.io.Serializable{
    
    //columns START
    //ID
    private Long id;
    //生产名称
    private String name;
    //反应类型
    private String reactionType;
    //最终产品
    private String finalProduct;
    //最终产品物质形态
    private String finalProductForm;
    //中间产品
    private String interminateProduct;
    //中间产品物质形态
    private String interminateProductForm;
    //工艺系统简介
    private String description;
    //工艺危险特点
    private String techDangerFeature;
    //安全控制的基本要求
    private String safeControlBaseRequiment;
    //是否重点监管危险化工工艺
    private String isKeyMonitoringDangerTech;
    //安全阀/爆破片使用情况
    private String safetyValveUsageStat;
    //工艺流程图
    private Long techProgressPicture;
    //创建人
    private Long createBy;
    //创建时间
    private java.util.Date createTime;
    //更新人
    private Long updateBy;
    //更新时间
    private java.util.Date updateTime;
    //删除标记
    private String deleteFlag;
    //组织机构代码
    private String orgCode;
    //租户
    private Long tenentId;
    //columns END


    public void setId(Long value) {
        this.id = value;
    }
    
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }
    
     
    @Column(name = "NAME", length = 100)
    public String getName() {
        return this.name;
    }
    
    public void setName(String value) {
        this.name = value;
    }
    
     
    @Column(name = "REACTION_TYPE", length = 100)
    public String getReactionType() {
        return this.reactionType;
    }
    
    public void setReactionType(String value) {
        this.reactionType = value;
    }
    
     
    @Column(name = "FINAL_PRODUCT", length = 100)
    public String getFinalProduct() {
        return this.finalProduct;
    }
    
    public void setFinalProduct(String value) {
        this.finalProduct = value;
    }
    
     
    @Column(name = "FINAL_PRODUCT_FORM", length = 50)
    public String getFinalProductForm() {
        return this.finalProductForm;
    }
    
    public void setFinalProductForm(String value) {
        this.finalProductForm = value;
    }
    
     
    @Column(name = "INTERMINATE_PRODUCT", length = 100)
    public String getInterminateProduct() {
        return this.interminateProduct;
    }
    
    public void setInterminateProduct(String value) {
        this.interminateProduct = value;
    }
    
     
    @Column(name = "INTERMINATE_PRODUCT_FORM", length = 50)
    public String getInterminateProductForm() {
        return this.interminateProductForm;
    }
    
    public void setInterminateProductForm(String value) {
        this.interminateProductForm = value;
    }
    
     
    @Column(name = "DESCRIPTION", length = 500)
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String value) {
        this.description = value;
    }
    
     
    @Column(name = "TECH_DANGER_FEATURE", length = 500)
    public String getTechDangerFeature() {
        return this.techDangerFeature;
    }
    
    public void setTechDangerFeature(String value) {
        this.techDangerFeature = value;
    }
    
     
    @Column(name = "SAFE_CONTROL_BASE_REQUIMENT", length = 500)
    public String getSafeControlBaseRequiment() {
        return this.safeControlBaseRequiment;
    }
    
    public void setSafeControlBaseRequiment(String value) {
        this.safeControlBaseRequiment = value;
    }
    
     
    @Column(name = "IS_KEY_MONITORING_DANGER_TECH", length = 2)
    public String getIsKeyMonitoringDangerTech() {
        return this.isKeyMonitoringDangerTech;
    }
    
    public void setIsKeyMonitoringDangerTech(String value) {
        this.isKeyMonitoringDangerTech = value;
    }
    
     
    @Column(name = "SAFETY_VALVE_USAGE_STAT", length = 100)
    public String getSafetyValveUsageStat() {
        return this.safetyValveUsageStat;
    }
    
    public void setSafetyValveUsageStat(String value) {
        this.safetyValveUsageStat = value;
    }
    
     
    @Column(name = "TECH_PROGRESS_PICTURE")
    public Long getTechProgressPicture() {
        return this.techProgressPicture;
    }
    
    public void setTechProgressPicture(Long value) {
        this.techProgressPicture = value;
    }
    
     
    @org.springframework.data.annotation.CreatedBy
    @Column(name = "CREATE_BY")
    public Long getCreateBy() {
        return this.createBy;
    }
    
    public void setCreateBy(Long value) {
        this.createBy = value;
    }
    
     
    @org.springframework.data.annotation.CreatedDate
    @Column(name = "CREATE_TIME")
    public java.util.Date getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(java.util.Date value) {
        this.createTime = value;
    }
    
     
    @org.springframework.data.annotation.LastModifiedBy
    @Column(name = "UPDATE_BY")
    public Long getUpdateBy() {
        return this.updateBy;
    }
    
    public void setUpdateBy(Long value) {
        this.updateBy = value;
    }
    
     
    @org.springframework.data.annotation.LastModifiedDate
    @Column(name = "UPDATE_TIME")
    public java.util.Date getUpdateTime() {
        return this.updateTime;
    }
    
    public void setUpdateTime(java.util.Date value) {
        this.updateTime = value;
    }
    
     
    @Column(name = "DELETE_FLAG", length = 2)
    public String getDeleteFlag() {
        return this.deleteFlag;
    }
    
    public void setDeleteFlag(String value) {
        this.deleteFlag = value;
    }
    
     
    @Column(name = "ORG_CODE", length = 100)
    public String getOrgCode() {
        return this.orgCode;
    }
    
    public void setOrgCode(String value) {
        this.orgCode = value;
    }
    
     
    @Column(name = "TENENT_ID")
    public Long getTenentId() {
        return this.tenentId;
    }
    
    public void setTenentId(Long value) {
        this.tenentId = value;
    }
    

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id",getId())
            .append("name",getName())
            .append("reactionType",getReactionType())
            .append("finalProduct",getFinalProduct())
            .append("finalProductForm",getFinalProductForm())
            .append("interminateProduct",getInterminateProduct())
            .append("interminateProductForm",getInterminateProductForm())
            .append("description",getDescription())
            .append("techDangerFeature",getTechDangerFeature())
            .append("safeControlBaseRequiment",getSafeControlBaseRequiment())
            .append("isKeyMonitoringDangerTech",getIsKeyMonitoringDangerTech())
            .append("safetyValveUsageStat",getSafetyValveUsageStat())
            .append("techProgressPicture",getTechProgressPicture())
            .append("createBy",getCreateBy())
            .append("createTime",getCreateTime())
            .append("updateBy",getUpdateBy())
            .append("updateTime",getUpdateTime())
            .append("deleteFlag",getDeleteFlag())
            .append("orgCode",getOrgCode())
            .append("tenentId",getTenentId())
            .toString();
    }
    
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }
    
    public boolean equals(Object obj) {
        if(obj instanceof BpManufacturingTech == false) return false;
        if(this == obj) return true;
        BpManufacturingTech other = (BpManufacturingTech)obj;
        return new EqualsBuilder()
            .append(getId(),other.getId())
            .isEquals();
    }
}

